﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Sys_Params.aspx.cs" Inherits="SYS_POPEDOM_Sys_Params" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>系统参数配置</title>
    <link href="../css/PageStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../JavaScript/Common.js"></script>
    <script type="text/javascript">
        function OnAfterEdit(grid) {
            var PARAMETER_ID = grid.record.data.PARAMETER_ID;
            var PARAMETER_NAME = grid.record.data.PARAMETER_NAME;
            var PARAMETER_STR = grid.record.data.PARAMETER_STR;
            var REMARK = grid.record.data.REMARK;
            Ext.net.DirectMethods.OnAfterEdit(PARAMETER_ID, PARAMETER_NAME, PARAMETER_STR, REMARK);
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" AjaxViewStateMode="Enabled" />
    <ext:Viewport ID="Viewport1" runat="server">
        <Content>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <Center>
                    <ext:Panel ID="Panel1" runat="server" BodyBorder="false">
                        <Content>
                            <ext:RowLayout ID="RowLayout1" runat="server">
                                <Rows>
                                    <ext:LayoutRow>
                                        <ext:Panel ID="Panel2" Height="60" runat="server" Border="false" Padding="5">
                                            <Content>
                                                <ext:FieldSet ID="FieldSet1" runat="server" Title="查询条件" Height="52" Layout="FitLayout">
                                                    <Content>
                                                        <ext:Container ID="Container1" runat="server" Layout="ColumnLayout">
                                                            <Items>
                                                                <ext:Container ID="Container2" runat="server" LabelAlign="Right" Layout="Form" ColumnWidth=".33">
                                                                    <Items>
                                                                        <ext:TextField ID="exttxt_PARAMETER_ID" runat="server" AnchorHorizontal="0.95" TabIndex="4"
                                                                            FieldLabel="参数名称">
                                                                        </ext:TextField>
                                                                    </Items>
                                                                </ext:Container>
                                                                <ext:Container ID="Container3" runat="server" LabelAlign="Right" Layout="Form" ColumnWidth=".33">
                                                                    <Items>
                                                                        <ext:TextField ID="exttxt_REMARK" runat="server" AnchorHorizontal="0.95" TabIndex="5"
                                                                            FieldLabel="描述">
                                                                        </ext:TextField>
                                                                    </Items>
                                                                </ext:Container>
                                                                <ext:Container ID="Container5" runat="server" LabelAlign="Right" Layout="Form" ColumnWidth=".33">
                                                                    <Items>
                                                                        <ext:Panel ID="Panel3" runat="server" Border="false" AnchorHorizontal="0.95">
                                                                            <Content>
                                                                                <table width="100%">
                                                                                    <tr style="width: 100%">
                                                                                        <td align="right">
                                                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                                        </td>
                                                                                        <td align="right" width="50%">
                                                                                            <ext:Button ID="extBtn_Search" runat="server" Text="查询" Icon="Find">
                                                                                            <DirectEvents>
                                                                                                    <Click OnEvent="OnBtnSearchClick">
                                                                                                        <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{GridPanel1}" Msg="正在加载..." />
                                                                                                    </Click>
                                                                                                </DirectEvents>
                                                                                            </ext:Button>
                                                                                        </td>
                                                                                        <td align="right">
                                                                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                                                                        </td>
                                                                                        <td align="left" width="50%">
                                                                                            <ext:Button ID="extBtn_Clear" runat="server" Text="清空" Icon="BasketDelete">
                                                                                                <Listeners>
                                                                                                    <Click Handler="ClearCtrlValues2(Container1);" />
                                                                                                </Listeners>
                                                                                            </ext:Button>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </Content>
                                                                        </ext:Panel>
                                                                    </Items>
                                                                </ext:Container>
                                                            </Items>
                                                        </ext:Container>
                                                    </Content>
                                                </ext:FieldSet>
                                            </Content>
                                        </ext:Panel>
                                    </ext:LayoutRow>
                                    <ext:LayoutRow RowHeight="1">
                                        <ext:Panel ID="Panel4" runat="server" BodyStyle="border-width:1 0 0 0;" Layout="Fit">
                                            <Content>
                                                <ext:GridPanel ID="GridPanel1" runat="server" AutoScroll="true" Border="false" TrackMouseOver="true"
                                                    StripeRows="true">
                                                    <ColumnModel ID="ColumnModel1" runat="server">
                                                        <Columns>
                                                            <ext:RowNumbererColumn Header="序号" Width="35" />
                                                            <ext:Column Header="参数名称" DataIndex="PARAMETER_ID" Width="150">
                                                            </ext:Column>
                                                            <ext:Column Header="参数值1" DataIndex="PARAMETER_NAME" Width="150">
                                                                <Editor>
                                                                    <ext:TextField runat="server" ID="exttxtf_PARAMETER_NAME" AllowBlank="false">
                                                                    </ext:TextField>
                                                                </Editor>
                                                            </ext:Column>
                                                            <ext:Column Header="参数值2" DataIndex="PARAMETER_STR"  Width="150">
                                                                 <Editor>
                                                                    <ext:TextField runat="server" ID="exttxtf_PARAMETER_STR" AllowBlank="true">
                                                                    </ext:TextField>
                                                                </Editor>
                                                            </ext:Column>
                                                            <ext:Column Header="描述" DataIndex="REMARK" Width="250">
                                                            
                                                            </ext:Column>
                                                        </Columns>
                                                    </ColumnModel>
                                                    <Store>
                                                        <ext:Store ID="Store1" runat="server" AutoLoad="true" OnRefreshData="MyData_Refresh">
                                                            <Proxy>
                                                                <ext:PageProxy>
                                                                </ext:PageProxy>
                                                            </Proxy>
                                                            <Reader>
                                                                <ext:JsonReader IDProperty="PARAMETER_ID">
                                                                    <Fields>
                                                                        <ext:RecordField Name="PARAMETER_ID" />
                                                                        <ext:RecordField Name="PARAMETER_NAME" />
                                                                        <ext:RecordField Name="PARAMETER_STR" />
                                                                        <ext:RecordField Name="REMARK" />
                                                                    </Fields>
                                                                </ext:JsonReader>
                                                            </Reader>
                                                        </ext:Store>
                                                    </Store>
                                                   <View>
                                                        <ext:GridView ID="GridView1" runat="server" MarkDirty="false" />
                                                    </View>
                                                    <Plugins>
                                                        <ext:RowEditor ID="RowEditor1" runat="server" ErrorSummary="false" SaveText="确定" CancelText="取消" ClicksToEdit="1">
                                                            <Listeners>
                                                                <AfterEdit Fn="OnAfterEdit" />
                                                            </Listeners>
                                                        </ext:RowEditor>
                                                    </Plugins>
                                                    <SelectionModel>
                                                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
                                                        </ext:RowSelectionModel>
                                                    </SelectionModel>
                                                    <BottomBar>
                                                        <ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="20" StoreID="Store1"
                                                            Height="25" DisplayInfo="true" DisplayMsg="显示{0} - {1},共{2}条" EmptyMsg="没有可显示的记录" />
                                                    </BottomBar>
                                                </ext:GridPanel>
                                            </Content>
                                        </ext:Panel>
                                    </ext:LayoutRow>
                                </Rows>
                            </ext:RowLayout>
                        </Content>
                    </ext:Panel>
                </Center>
            </ext:BorderLayout>
        </Content>
    </ext:Viewport>
    </form>
</body>
</html>